package com.linkallcloud.core.vo;

import java.io.Serializable;

import org.springframework.beans.BeanUtils;

import com.linkallcloud.core.security.ICage;

public abstract class Vo implements ICage, Serializable {
    private static final long serialVersionUID = 5793835222248175331L;

    // protected Log log = Logs.get();

    public Vo() {
        super();
    }

    public Vo(Object o) {
        if (o != null) {
            try {
                BeanUtils.copyProperties(o, this);
            } catch (Throwable e) {
                // log.warn("Fail to copy properties!", e);
            }
        }
    }

    public Vo clone() {
        try {
            Vo newObj = this.getClass().getDeclaredConstructor().newInstance();
            BeanUtils.copyProperties(this, newObj);
            return newObj;
        } catch (Throwable e) {
            return null;
        }
    }

    @Override
    public void dataMasking(String nonce) {

    }

    @Override
    public void reenforce(String nonce) {

    }

}
